package com.oren.Thread.study.day01;

/**
 * Created by IntelliJ IDEA.
 * User: wangshiwei
 * Date: 2018/8/3
 * Time: 13:39
 * describe: 线程共享 并引发线程安全问题
 */
public class Demo3 extends Thread{

    int total=7;

    @Override
    public  void run(){
        super.run();
        total--;
        System.out.println("由"+this.currentThread().getName()+"计算，total ="+total);
    }

}
